package exception.demo1;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FinallyDemo {
    public static void main(String[] args) {
        System.out.println("程序开始");
        try{
            String line=null;
            System.out.println(line.length());
        } catch (Exception e) {
            System.out.println("发现了一个异常并已解决");
        }finally {
            System.out.println("Finally代码块");
        }
        System.out.println("程序结束");
    }
}
